findSeverity

fun findSeverity(score: Int, evalType: String): String

Finds the severity level based on the given score and evaluation type (anxiety or depression).

This function checks the provided score against predefined ranges for either anxiety or depression, depending on the evaluation type, and returns the corresponding severity level.

Return

The severity level corresponding to the given score and evaluation type.

Parameters

score

The score value to be checked.

evalType

The type of evaluation, either "anxiety" or "depression".